home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 18 / CU Amiga Magazine's Super CD-ROM 18 (1997)(EMAP Images)(GB)[!][issue 1998-01].iso / CUCD / Online / CNetDemo / cnet / sdk / include / users.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-09-04  |  11.7 KB  |  406 lines

  1.  
  2. #ifndef CNET_USERS
  3. #define CNET_USERS
  4.  
  5. #include "dates.h"
  6.  
  7.  
  8. struct Privs {                /* each user&group has one */
  9.     long    MBaseFlags;        /* 580 */
  10.     long    FBaseFlags;        /* 584 Can user reach which subs ? */
  11.     long    LBaseFlags;        /* 588 Gfiles/Pfiles/Telnet/Other flags */
  12.  
  13.     ULONG    ABits;            /* 592 see bitdefs above */
  14.  
  15.     long    DailyDownBytes;        /* 596 */
  16.     long    DailyUpBytes;        /* 600 */
  17.     long    XFreeBytes;        /* 604 !!! NOT USED ANYMORE !!! */
  18.     long    XFreeFiles;        /* 608 SEE GLOBAL DEFAULT IN CONFIG1 */
  19.  
  20.     short    Calls;            /* 612 */
  21.     short    CallMinutes;        /* 614 */
  22.     short    DailyMinutes;        /* 616 */
  23.     short    DailyDownloads;        /* 618 per 24 hr DAY */
  24.     short    DailyUploads;        /* 620 same */
  25.     short    Messages;        /* 622 */
  26.     short    Feedbacks;        /* 624 */
  27.     short    EditorLines;        /* 626 */
  28.     short    Idle;            /* 628 */
  29.     short    MaxMailKBytes;        /* 630 */
  30.     short    PurgeDays;        /* 632 */
  31.  
  32.     UBYTE    FileRatio;        /* 634 */
  33.     UBYTE    ByteRatio;
  34.     UBYTE    FileRatio2;
  35.     UBYTE    ByteRatio2;
  36.     UBYTE    FileRatio3;
  37.     UBYTE    ByteRatio3;
  38.  
  39.     ULONG    ABits2;            /* 640 now gives 64 flags! */
  40.  
  41.     short    SigLines;        /* 644 how many lines per signature */
  42.  
  43.     UBYTE    AllowAliases;        /* 646 new tri-state variables */
  44.     UBYTE    DeleteOwn;
  45.     UBYTE    Anonymous;
  46.     UBYTE    PrivateArea;
  47.  
  48.     short    DailyPfileMinutes;    /* 650 */
  49.     short    LogToMail;        /* account # to send log */
  50.  
  51.     long    LogFlags;        /* 654 */
  52.  
  53.     UBYTE    CallBack;        /* 658 Tri-state */
  54.     UBYTE    TermLink;        /* 659 */
  55.     UBYTE    CallerID;        /* 660 */
  56.     UBYTE    PageSysop;        /* 661 */
  57.  
  58.     LONG    not_usedeither;
  59.  
  60.     char    exp[ 2 ];        /* 666 */
  61.  
  62.     short    Alias;            /* 668 */
  63.     short    Dictionary;        /* 670 */
  64. };
  65.  
  66. /* LONG Aligned, total length==672 */
  67.  
  68. struct UserData {            /* each user account */
  69.     long    IDNumber;        /* 0 unique (serial) ID # */
  70.     char    Handle[21];        /* 4 */
  71.     char    RealName[26];        /* 25 */
  72.     char    Address[31];        /* 51 */
  73.     char    CityState[31];        /* 82 */
  74.     char    ZipCode[11];        /* 113 */
  75.     char    Country[8];        /* 124 */
  76.     char    PhoneNo[17];        /* 132 Euro 8-7 format POSSIBLE!! */
  77.     char    PassWord[15];        /* 149 */
  78.     char    Comments[34];        /* 164 */
  79.     char    Macro[3][36];        /* 198 user's defined macro keys */
  80.     char    Organ[31];        /* 306 */
  81.     UBYTE    PhoneVerified;        /* 337 */
  82.  
  83.     struct    PortData *z;        /* for lock account */
  84.  
  85.     struct    IsDate Birthdate;    /* 342 */
  86.     struct    IsDate FirstCall;    /* 348 */
  87.     struct    IsDate LastCall;    /* 354 */
  88.  
  89.     ULONG    EMailFlags;        /* 360 */
  90.     
  91.     USHORT    InterfaceType;        // 364 - 0: CNet/4 Type -  number entered = read message x
  92.                               //       1: CNet/3 Type - number entered = move to subboard x
  93.  
  94.     struct    IsDate ConnectDate;    /* 366 - date of connection */
  95.     struct    IsDate YankDate;    /* 372 - date of last yank */
  96.  
  97.     BYTE    Access;            /* 378 - current access level */
  98.     BYTE    ExpireAccess;        /* 379 - access level to expire to when "ExpireDate" is reached */
  99.  
  100.     short    PfileTimeToday;
  101.  
  102.     short    not_used2;        // expansion
  103.  
  104.     BYTE    TextSet;            // 384 - which BBSTEXT/MENU translation
  105.     BYTE    TimeForm;        // which time form to use
  106.     BYTE    MoreMode;        // more? mode
  107.     BYTE    LineFeeds;        // user requires line feeds
  108.     BYTE    FracBal;            // 1/100ths of a cent
  109.     BYTE    TimeZone;        // time zone (relative to local system time)
  110.     BYTE    Colors;            // can user display ANSI colors?
  111.     BYTE    Tabs;                // can user do ANSI tabs?
  112.     BYTE    ANSI;                // 392 - user's ANSI type
  113.     BYTE    Sex;                // user's gender
  114.     BYTE    AutoMore;        // More? and CLS between messages?
  115.     BYTE    TermType;        // Terminal emulation
  116.     BYTE    HelpLevel;        // 396 - novice, intermediate etc..
  117.     BYTE    CompType;        // computer type - relative to top of section 30; in BBSMENU
  118.     BYTE    DefProtocol;    // 398 - user's default txfer protocol
  119.     BYTE    TermWidth;        // number of characters per line
  120.     BYTE    TermLength;        // 400 - number of lines for full screen
  121.     BYTE    MailBoxOpen;    // 401 - mailbox open or closed
  122.     short    MailForward;    // 402 - mail forward to account stored here - if 0, no forward
  123.  
  124.     long     TotalCalls;            /* 404 */
  125.     long    PubMessages;        /* 408 */
  126.     long    PriMessages;        /* 412 */
  127.     long    UpBytes;                /* 416 KILO bytes */
  128.     long    UpFiles;                /* 420 */
  129.     long    DownBytes;            /* 424 KILO bytes */
  130.     long    DownFiles;            /* 428 */
  131.  
  132.     long    FileCredits;        /* 432 CREDITS used now! */
  133.     long    ByteCredits;        /* 436 */
  134.     long    TimeCredits;        /* 440 */
  135.  
  136.     long    Balance;                /* 444 */
  137.     long    NetCredits;            /* 448 */
  138.     long    DoorPoints;            /* 452 */
  139.  
  140.     long    DayUpBytes;            /* 456 */
  141.     long    DayDownBytes;        /* 460 */
  142.     short    DayUpFiles;            /* 464 */
  143.     short    DayDownFiles;        /* 466 */
  144.  
  145.     short    CallsToday;            /* 468 */
  146.     short     TimeToday;        /* 470 */
  147.     short    LogonAttempts;        /* 472 */
  148.  
  149.     USHORT    BaudRate;        /* 474 */
  150.     USHORT    HighBaud;        /* 476 */
  151.  
  152.     char    UUCP[11];            /* 478 - valid length of UUCP name is still 9 characters with one termination \0 to make 10 total */
  153.  
  154.     UBYTE    PName;                /* 489 flags, are these data     */
  155.     UBYTE    PAge;                    /* items to be kept private? */
  156.     UBYTE    PAddress;            /* street address only */
  157.     UBYTE    PVoice;                /* phone numbers */
  158.     UBYTE    PData;
  159.  
  160.     char    Banner[43];            /* 494 */
  161.  
  162.     char    VoiceNo[17];        /* 537 Euro 8-7 format POSSIBLE!! */
  163.  
  164.     short    YankCount;            /* 554 */
  165.  
  166.     struct    IsDate ExpireDate;    /* 556 */
  167.     struct    IsDate FNewDate;        /* 562 */
  168.  
  169.     char    more[7];                /* 568 reserved */
  170.  
  171.     UBYTE    YankCR;                /* 575 add CR's to yank text? */
  172.     UBYTE    YankArc;                /* which archiver to use? */
  173.     BYTE    DefEditor;            /* 577 */
  174.     BYTE    AutoHide;
  175.     BYTE    MailSort;            /* 579 */
  176.     struct    Privs MyPrivs;        /* 580 THESE ACTUALLY USED, not AGC */
  177. };
  178.  
  179.  
  180. struct UserData426a {            /* each user account */
  181.     long    IDNumber;        /* 0 unique (serial) ID # */
  182.     char    Handle[21];        /* 4 */
  183.     char    RealName[26];        /* 25 */
  184.     char    Address[31];        /* 51 */
  185.     char    CityState[31];        /* 82 */
  186.     char    ZipCode[11];        /* 113 */
  187.     char    Country[8];        /* 124 */
  188.     char    PhoneNo[17];        /* 132 Euro 8-7 format POSSIBLE!! */
  189.     char    PassWord[15];        /* 149 */
  190.     char    Comments[34];        /* 164 */
  191.     char    Macro[3][36];        /* 198 user's defined macro keys */
  192.     char    Organ[31];        /* 306 */
  193.     UBYTE    PhoneVerified;        /* 337 */
  194.  
  195.     struct    PortData *z;        /* for lock account */
  196.  
  197.     struct    IsDate Birthdate;    /* 342 */
  198.     struct    IsDate FirstCall;    /* 348 */
  199.     struct    IsDate LastCall;    /* 354 */
  200.  
  201.     ULONG EMailFlags;                    // set before entering the editor to write mail.
  202.     
  203.     USHORT    InterfaceType;            // 364 - 0: CNet/4 Type -  number entered = read message x
  204.                                   //       1: CNet/3 Type - number entered = move to subboard x
  205.  
  206.     struct    IsDate ConnectDate;    /* 366 - date of connection */
  207.     struct    IsDate YankDate;    /* 372 - date of last yank */
  208.  
  209.     BYTE    Access;            /* 378 - current access level */
  210.     BYTE    ExpireAccess;        /* 379 - access level to expire to when "ExpireDate" is reached */
  211.  
  212.     short    PfileTimeToday;
  213.  
  214.     short    not_used2;        // expansion
  215.  
  216.     BYTE    TextSet;            // 384 - which BBSTEXT/MENU translation
  217.     BYTE    TimeForm;        // which time form to use
  218.     BYTE    MoreMode;        // more? mode
  219.     BYTE    LineFeeds;        // user requires line feeds
  220.     BYTE    FracBal;            // 1/100ths of a cent
  221.     BYTE    TimeZone;        // time zone (relative to local system time)
  222.     BYTE    Colors;            // can user display ANSI colors?
  223.     BYTE    Tabs;                // can user do ANSI tabs?
  224.     BYTE    ANSI;                // 392 - user's ANSI type
  225.     BYTE    Sex;                // user's gender
  226.     BYTE    AutoMore;        // More? and CLS between messages?
  227.     BYTE    TermType;        // Terminal emulation
  228.     BYTE    HelpLevel;        // 396 - novice, intermediate etc..
  229.     BYTE    CompType;        // computer type - relative to top of section 30; in BBSMENU
  230.     BYTE    DefProtocol;    // 398 - user's default txfer protocol
  231.     BYTE    TermWidth;        // number of characters per line
  232.     BYTE    TermLength;        // 400 - number of lines for full screen
  233.     BYTE    MailBoxOpen;    // 401 - mailbox open or closed
  234.     short    MailForward;    // 402 - mail forward to account stored here - if 0, no forward
  235.  
  236.     long     TotalCalls;            /* 404 */
  237.     long    PubMessages;        /* 408 */
  238.     long    PriMessages;        /* 412 */
  239.     long    UpBytes;                /* 416 KILO bytes */
  240.     long    UpFiles;                /* 420 */
  241.     long    DownBytes;            /* 424 KILO bytes */
  242.     long    DownFiles;            /* 428 */
  243.  
  244.     long    FileCredits;        /* 432 CREDITS used now! */
  245.     long    ByteCredits;        /* 436 */
  246.     long    TimeCredits;        /* 440 */
  247.  
  248.     long    Balance;                /* 444 */
  249.     long    NetCredits;            /* 448 */
  250.     long    DoorPoints;            /* 452 */
  251.  
  252.     long    DayUpBytes;            /* 456 */
  253.     long    DayDownBytes;        /* 460 */
  254.     short    DayUpFiles;            /* 464 */
  255.     short    DayDownFiles;        /* 466 */
  256.  
  257.     short    CallsToday;            /* 468 */
  258.     short     TimeToday;        /* 470 */
  259.     short    LogonAttempts;        /* 472 */
  260.  
  261.     USHORT    BaudRate;        /* 474 */
  262.     USHORT    HighBaud;        /* 476 */
  263.  
  264.     char    UUCP[11];            /* 478 - valid length of UUCP name is still 9 characters with one termination \0 to make 10 total */
  265.  
  266.     UBYTE    PName;                /* 489 flags, are these data     */
  267.     UBYTE    PAge;                    /* items to be kept private? */
  268.     UBYTE    PAddress;            /* street address only */
  269.     UBYTE    PVoice;                /* phone numbers */
  270.     UBYTE    PData;
  271.  
  272.     char    Banner[43];            /* 494 */
  273.  
  274.     char    VoiceNo[17];        /* 537 Euro 8-7 format POSSIBLE!! */
  275.  
  276.     short    YankCount;            /* 554 */
  277.  
  278.     struct    IsDate ExpireDate;    /* 556 */
  279.     struct    IsDate FNewDate;        /* 562 */
  280.  
  281.     char    more[7];                /* 568 reserved */
  282.  
  283.     UBYTE    YankCR;                /* 575 add CR's to yank text? */
  284.     UBYTE    YankArc;                /* which archiver to use? */
  285.     BYTE    DefEditor;            /* 577 */
  286.     BYTE    AutoHide;
  287.     BYTE    MailSort;            /* 579 */
  288.     struct    Privs MyPrivs;        /* 580 THESE ACTUALLY USED, not AGC */
  289.  
  290.     // 08-Mar-97
  291.     char ReplyTo[128];        // user's return email address used in "Reply-To" fields
  292.  
  293.     BYTE expansion[128];        // expansion.
  294. };
  295.  
  296.  
  297. #define EDHANDLE_FLAG            0x01    /* bit defs for ABits2 of struct Privs */
  298. #define EDREALNAME_FLAG            0x02
  299. #define EDADDRESS_FLAG            0x04
  300. #define EDVOICE_FLAG                  0x08
  301. #define EDDATA_FLAG                0x10
  302. #define BANNER_FLAG                0x20
  303. #define NOT_USED_FLAG            0x40
  304. #define PORTMONITOR_FLAG        0x80
  305. #define VOTEMAINT_FLAG            0x0100
  306. #define ALARMSYSOP_FLAG            0x0200
  307. #define OPENSCREEN_FLAG            0x0400
  308. #define OPENCAPTURE_FLAG        0x0800
  309. #define NETMAIL_FLAG                0x1000
  310. #define FREQSEND_FLAG            0x2000
  311. #define NETCOSTEXEMPT_FLAG        0x4000
  312. #define EXPANSION1_FLAG            0x8000
  313. #define EXPANSION2_FLAG            0x010000
  314. #define EXPANSION3_FLAG            0x020000
  315. #define EXPANSION4_FLAG            0x040000
  316. #define UUCPMAIL_FLAG            0x080000
  317. #define NETCOSTCREDITS_FLAG    0x100000
  318. #define HOLDANDCRASH_FLAG        0x200000
  319. #define EXPANSION8_FLAG            0x400000
  320. #define BROADCAST_FLAG            0x800000
  321. #define SUPERUSER_FLAG            0x01000000
  322.  
  323. #define EMAIL_FLAG            0x01    /* bit defs for ABits of struct Privs */
  324. #define    PFILE_FLAG            0x02
  325. #define GFILE_FLAG            0x04
  326. #define    ULIST_FLAG            0x08
  327. #define    SYSOP_FLAG            0x10
  328. #define    REWARDS_FLAG        0x20    /* may receive download rewards? */
  329. #define    FCREDEX_FLAG        0x40
  330. #define BCREDEX_FLAG            0x80
  331. #define    EXPIREMAIL_FLAG    0x0100
  332. #define    BULKMAIL_FLAG        0x0200
  333. #define XXXXXXXXX6_FLAG        0x0400
  334. #define    URGENTMAIL_FLAG    0x0800
  335. #define    TIMESBP_FLAG        0x1000
  336. #define    FILEADD_FLAG        0x2000
  337. #define    READANY_FLAG        0x4000
  338. #define    DELETEANY_FLAG        0x8000
  339. #define XXXXXXXXX_FLAG        0x010000    /* not used */
  340. #define    XXXXXXXXX4_FLAG        0x020000
  341. #define AUTOVALID_FLAG        0x040000
  342. #define    XXXXXXXXX2_FLAG        0x080000    /* not used */
  343. #define    SEEANON_FLAG        0x100000
  344. #define    XXXXXXXXX3_FLAG        0x200000    /* not used */
  345. #define    CONF_FLAG        0x400000
  346. #define CONFCON_FLAG        0x800000
  347. #define MCI1_FLAG        0x01000000
  348. #define MCI2_FLAG        0x02000000
  349. #define    RELOGON_FLAG        0x04000000
  350. #define RECEIVEMAIL_FLAG     0x08000000
  351. #define FORWARD_FLAG           0x10000000
  352. #define VOTETOPIC_FLAG      0x20000000
  353. #define VOTECHOICE_FLAG     0x40000000
  354. #define NOLOCKS_FLAG        0x80000000
  355.  
  356. // obsolete
  357.  
  358. struct ULock {                /* account locking node!!! */
  359.     short    Account;
  360.     short    Wait;
  361.  
  362.     struct    SignalSemaphore Sem;
  363.  
  364.     struct    UserData user1;
  365.     struct    UserData *u;
  366.  
  367.     struct    ULock *Next;
  368. };
  369.  
  370. struct AccessGroup {
  371.     char    Name[32];        /*   0 */
  372.     struct    Privs DefPrivs;        /*  32 */
  373.  
  374.     short    ExpireDays;        /*  32+92 */
  375.     UBYTE    ExpireAccess;        /*  32+94 */
  376.  
  377.     char    exp[29];
  378. };
  379.  
  380. struct KeyElement3 {
  381.     char    UUCP[8];
  382.     long    IDNumber;        /* high order byte ALWAYS 0 */
  383.     long    phone1, phone2;        /* data phone's area code & local # */
  384.     char    Handle   [21];
  385.     char    RealName [26];
  386.     UBYTE    PName;
  387. };
  388.  
  389. struct OldKeyElement {
  390.     char    Handle[22];        /* actual user handle */
  391.     short    HandleX;        /* account number where found */
  392. };
  393.  
  394. struct KeyElement4 {
  395.     char    UUCP[11];            // 10 characters allowed in UUCP name - plus terminating 0 byte
  396.     long    IDNumber;            /* high order byte ALWAYS 0 */
  397.     long    phone1, phone2;    /* data phone's area code & local # */
  398.     char    Handle   [21];
  399.     char    RealName [26];
  400.     UBYTE    PName;
  401.  
  402.     BYTE Access;    // user's access group!
  403. };
  404.  
  405. #endif
  406.